package com.veng.springbootdemo.rabbit;

import com.veng.springbootdemo.po.User;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "fanout.B")
public class FanoutRabbitReceiver2 {
    @RabbitHandler
    public void process(User user){
        String userName = user.getUserName();
        System.out.println("I am 2:" + userName);
    }
}
